Migrate claude-code-review.yml to the Morrison-Lab/gha reusable workflow - #181
Merged
Merged
Conversation
…low (closes #178) Replace the bespoke anthropics/claude-code-action@v1 review workflow with a thin caller of Morrison-Lab/gha/.github/workflows/claude-code-review.yml@v2, so rpt inherits upstream hardening automatically as @v2 slides (stub-review retry, verdict/is_error guard, prior-review-context dedup, older-comment collapse, cost comment, gha#400's duplicate-review fix). Gap 2 (reviewer toggling) is resolved for free: the reusable workflow already stashes/clears all requested reviewers (human and AI) while Claude reviews and re-requests them afterward -- a superset of the removed d-morrison-only toggle. Gap 1 (tag vs agent mode): migrate in agent mode (track-progress defaults false) since upstream read_only support (anthropics/claude-code-action#1415) is unshipped and agent mode can't post inline comments (anthropics/claude-code-action#635). Reviews are summary-only for now; flip track-progress: true once one of those upstream fixes lands. rpt's R-package review guidance is preserved via the prompt-addendum input.
Contributor
|
Collaborator
Author
Self-review (no external reviewer reachable for this PR)
So this migration rests on a self-review plus the fact that the reusable What I verified
Verdict: clean. No blocking findings. Leaving the merge to a human, since no external verdict is obtainable pre-merge. |
d-morrison
added a commit
that referenced
this pull request
Aug 4, 2026
…loses #182) Replace the bespoke anthropics/claude-code-action@v1 @claude agent workflow with a thin caller of Morrison-Lab/gha/.github/workflows/claude.yml@v2, so rpt inherits upstream hardening as @v2 slides (bot-actor self-trigger guard, late comment polling, reviewer re-request + review re-dispatch on push, cost comment, push-failure reporting). The second half of #178 (whose review- workflow half landed in #181). Two deliberate behavior changes (see #182): - contents: read -> write: the agent can now push branches and open PRs (the bespoke agent was comment-only). - Adds a trusted-author gate (OWNER/MEMBER/COLLABORATOR): the bespoke workflow gated only on the @claude mention with no author check, so the gate is what makes the contents: write upgrade safe. The two are coupled. The bespoke reviewer stash-while-working / re-add-after is replaced by the reusable's reviewer input (re-request d-morrison when Claude pushes commits). Inputs: install-quarto (rpt uses Quarto for vignettes/website); setup-r and use-renv left at defaults (true/false) since rpt CI restores deps from DESCRIPTION via setup-r-dependencies, not renv. rpt's R-package pre-commit checklist rides along via prompt-addendum.
d-morrison
added a commit
that referenced
this pull request
Aug 4, 2026
…le-call timeout exception Review of #183 (claude-review, Needs more work) raised two documentation findings; both addressed: 1. The header comment and PR body flagged only contents: read->write, but the diff also escalates issues: read->write and actions: read->write. The header now enumerates all four permission changes with each one's reason. 2. A uses: reusable-workflow-call job cannot set timeout-minutes, so this job inherits the reusable's timeout-minutes: 60, exceeding copilot-instructions.md's 50-minute cap. #181 already merged the same structural gap, so main's own instructions were already contradicted. Add a reusable-call exception to that rule and disclose the 50->60 change in the header. No functional change to the workflow (claude.yml edits are comment-only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #178.
Replaces rpt's bespoke
anthropics/claude-code-action@v1review workflow with a thin caller ofMorrison-Lab/gha/.github/workflows/claude-code-review.yml@v2. A DRW win: one less bespoke workflow to maintain, and rpt now inherits upstream hardening automatically as@v2slides (stub-review retry, theis_error/verdict guard, prior-review-context dedup, older-comment collapse, the cost comment, and fixes like gha#400).Follows rme's migration (
d-morrison/rme's stub), the closest peer (R package with automatic review).The two gaps the issue flagged
Gap 1 --- tag mode vs agent mode: migrate now in agent mode
Upstream
anthropics/claude-code-action#1415(theread_onlyinput that would make tag mode safe) is still an open, unmerged feature request, and agent mode can't post inline comments (anthropics/claude-code-action#635leaves the inline-comment tool uninitialized). So the practical choice was migrate-now-summary-only vs keep-bespoke-until-upstream-ships. Confirmed with the maintainer: migrate now, accepting summary-only reviews. The stub documents flippingtrack-progress: trueonce either upstream fix lands.Because agent mode is summary-only, the prompt-addendum drops the old "post line-specific findings as inline comments" instruction (it would tell the reviewer to use a tool that isn't initialized); the R-package-specific guidance is otherwise preserved verbatim.
Gap 2 --- reviewer toggling: already resolved upstream, no caller-side jobs needed
The issue's premise ("the gha reusable review workflow has no equivalent") is now stale. The reusable workflow already stashes/clears all requested reviewers (human and AI, e.g. Copilot) before Claude reviews and re-requests them when it finishes --- a superset of the hardcoded
d-morrison-only DELETE/POST this file used to carry. So reviewer toggling comes for free; the two custom jobs are simply gone.Feature diff (bespoke -> reusable)
pull_requestreviewworkflow_dispatchre-review (pr_number)pr-number(nowtype: string, matchinggh workflow run -f)allowed_bots: github-actions[bot],claudeallowed-bots: "github-actions[bot],claude"if:(draft +sender.type != 'Bot'+ same-repo)d-morrisonreviewerprompt-addendum(inline-comment instruction dropped for agent mode)lab-manual(SERG manual) anduse-ai-configdefault on, so rpt gains the lab's shared review conventions on top of its ownCLAUDE.md.Scope
claude.yml(the@claudeagent workflow) is a separate migration per the issue, with its own reviewer-toggling difference (bespoke removes-while-working + re-adds-after; the reusableclaude.ymlre-requests therevieweron push). rme deliberately kept its bespokeclaude.yml, so there's precedent either way --- happy to do it as a follow-up.Note on this PR's own review
This PR edits
claude-code-review.yml, so the bespoke workflow still onmainself-skips its review (its own selfmod guard), and the new@v2reusable one isn't onmainyet --- so neither produces an automated verdict here. The migrated workflow takes effect on the next PR after merge.🤖 Generated with Claude Code